home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIEnumerator.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  226 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIEnumerator.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIEnumerator_h__
  6. #define __gen_nsIEnumerator_h__
  7.  
  8.  
  9. #ifndef __gen_nsISimpleEnumerator_h__
  10. #include "nsISimpleEnumerator.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. #define NS_ENUMERATOR_FALSE 1
  18. extern "C" NS_COM nsresult
  19. NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
  20.  
  21. /* starting interface:    nsIEnumerator */
  22. #define NS_IENUMERATOR_IID_STR "ad385286-cbc4-11d2-8cca-0060b0fc14a3"
  23.  
  24. #define NS_IENUMERATOR_IID \
  25.   {0xad385286, 0xcbc4, 0x11d2, \
  26.     { 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
  27.  
  28. class NS_NO_VTABLE nsIEnumerator : public nsISupports {
  29.  public: 
  30.  
  31.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IENUMERATOR_IID)
  32.  
  33.   /** First will reset the list. will return NS_FAILED if no items
  34.    */
  35.   /* void first (); */
  36.   NS_IMETHOD First(void) = 0;
  37.  
  38.   /** Next will advance the list. will return failed if already at end
  39.    */
  40.   /* void next (); */
  41.   NS_IMETHOD Next(void) = 0;
  42.  
  43.   /** CurrentItem will return the CurrentItem item it will fail if the 
  44.    *  list is empty
  45.    */
  46.   /* nsISupports currentItem (); */
  47.   NS_IMETHOD CurrentItem(nsISupports **_retval) = 0;
  48.  
  49.   /** return if the collection is at the end.  that is the beginning following 
  50.    *  a call to Prev and it is the end of the list following a call to next
  51.    */
  52.   /* void isDone (); */
  53.   NS_IMETHOD IsDone(void) = 0;
  54.  
  55. };
  56.  
  57. /* Use this macro when declaring classes that implement this interface. */
  58. #define NS_DECL_NSIENUMERATOR \
  59.   NS_IMETHOD First(void); \
  60.   NS_IMETHOD Next(void); \
  61.   NS_IMETHOD CurrentItem(nsISupports **_retval); \
  62.   NS_IMETHOD IsDone(void); 
  63.  
  64. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  65. #define NS_FORWARD_NSIENUMERATOR(_to) \
  66.   NS_IMETHOD First(void) { return _to First(); } \
  67.   NS_IMETHOD Next(void) { return _to Next(); } \
  68.   NS_IMETHOD CurrentItem(nsISupports **_retval) { return _to CurrentItem(_retval); } \
  69.   NS_IMETHOD IsDone(void) { return _to IsDone(); } 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  72. #define NS_FORWARD_SAFE_NSIENUMERATOR(_to) \
  73.   NS_IMETHOD First(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->First(); } \
  74.   NS_IMETHOD Next(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Next(); } \
  75.   NS_IMETHOD CurrentItem(nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CurrentItem(_retval); } \
  76.   NS_IMETHOD IsDone(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsDone(); } 
  77.  
  78. #if 0
  79. /* Use the code below as a template for the implementation class for this interface. */
  80.  
  81. /* Header file */
  82. class nsEnumerator : public nsIEnumerator
  83. {
  84. public:
  85.   NS_DECL_ISUPPORTS
  86.   NS_DECL_NSIENUMERATOR
  87.  
  88.   nsEnumerator();
  89.  
  90. private:
  91.   ~nsEnumerator();
  92.  
  93. protected:
  94.   /* additional members */
  95. };
  96.  
  97. /* Implementation file */
  98. NS_IMPL_ISUPPORTS1(nsEnumerator, nsIEnumerator)
  99.  
  100. nsEnumerator::nsEnumerator()
  101. {
  102.   /* member initializers and constructor code */
  103. }
  104.  
  105. nsEnumerator::~nsEnumerator()
  106. {
  107.   /* destructor code */
  108. }
  109.  
  110. /* void first (); */
  111. NS_IMETHODIMP nsEnumerator::First()
  112. {
  113.     return NS_ERROR_NOT_IMPLEMENTED;
  114. }
  115.  
  116. /* void next (); */
  117. NS_IMETHODIMP nsEnumerator::Next()
  118. {
  119.     return NS_ERROR_NOT_IMPLEMENTED;
  120. }
  121.  
  122. /* nsISupports currentItem (); */
  123. NS_IMETHODIMP nsEnumerator::CurrentItem(nsISupports **_retval)
  124. {
  125.     return NS_ERROR_NOT_IMPLEMENTED;
  126. }
  127.  
  128. /* void isDone (); */
  129. NS_IMETHODIMP nsEnumerator::IsDone()
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* End of implementation class template. */
  135. #endif
  136.  
  137.  
  138. /* starting interface:    nsIBidirectionalEnumerator */
  139. #define NS_IBIDIRECTIONALENUMERATOR_IID_STR "75f158a0-cadd-11d2-8cca-0060b0fc14a3"
  140.  
  141. #define NS_IBIDIRECTIONALENUMERATOR_IID \
  142.   {0x75f158a0, 0xcadd, 0x11d2, \
  143.     { 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
  144.  
  145. class NS_NO_VTABLE nsIBidirectionalEnumerator : public nsIEnumerator {
  146.  public: 
  147.  
  148.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBIDIRECTIONALENUMERATOR_IID)
  149.  
  150.   /** Last will reset the list to the end. will return NS_FAILED if no items
  151.    */
  152.   /* void last (); */
  153.   NS_IMETHOD Last(void) = 0;
  154.  
  155.   /** Prev will decrement the list. will return failed if already at beginning
  156.    */
  157.   /* void prev (); */
  158.   NS_IMETHOD Prev(void) = 0;
  159.  
  160. };
  161.  
  162. /* Use this macro when declaring classes that implement this interface. */
  163. #define NS_DECL_NSIBIDIRECTIONALENUMERATOR \
  164.   NS_IMETHOD Last(void); \
  165.   NS_IMETHOD Prev(void); 
  166.  
  167. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  168. #define NS_FORWARD_NSIBIDIRECTIONALENUMERATOR(_to) \
  169.   NS_IMETHOD Last(void) { return _to Last(); } \
  170.   NS_IMETHOD Prev(void) { return _to Prev(); } 
  171.  
  172. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  173. #define NS_FORWARD_SAFE_NSIBIDIRECTIONALENUMERATOR(_to) \
  174.   NS_IMETHOD Last(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Last(); } \
  175.   NS_IMETHOD Prev(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prev(); } 
  176.  
  177. #if 0
  178. /* Use the code below as a template for the implementation class for this interface. */
  179.  
  180. /* Header file */
  181. class nsBidirectionalEnumerator : public nsIBidirectionalEnumerator
  182. {
  183. public:
  184.   NS_DECL_ISUPPORTS
  185.   NS_DECL_NSIBIDIRECTIONALENUMERATOR
  186.  
  187.   nsBidirectionalEnumerator();
  188.  
  189. private:
  190.   ~nsBidirectionalEnumerator();
  191.  
  192. protected:
  193.   /* additional members */
  194. };
  195.  
  196. /* Implementation file */
  197. NS_IMPL_ISUPPORTS1(nsBidirectionalEnumerator, nsIBidirectionalEnumerator)
  198.  
  199. nsBidirectionalEnumerator::nsBidirectionalEnumerator()
  200. {
  201.   /* member initializers and constructor code */
  202. }
  203.  
  204. nsBidirectionalEnumerator::~nsBidirectionalEnumerator()
  205. {
  206.   /* destructor code */
  207. }
  208.  
  209. /* void last (); */
  210. NS_IMETHODIMP nsBidirectionalEnumerator::Last()
  211. {
  212.     return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214.  
  215. /* void prev (); */
  216. NS_IMETHODIMP nsBidirectionalEnumerator::Prev()
  217. {
  218.     return NS_ERROR_NOT_IMPLEMENTED;
  219. }
  220.  
  221. /* End of implementation class template. */
  222. #endif
  223.  
  224.  
  225. #endif /* __gen_nsIEnumerator_h__ */
  226.